cmake_minimum_required(VERSION 3.15)

execute_process(COMMAND bash date2ver  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

include(application/ls_proj.conf)

find_package(bouffalo_sdk REQUIRED HINTS $ENV{BL_SDK_BASE})

add_subdirectory(application/cjson)
add_subdirectory(application/struct_flash)
add_subdirectory(application/partition)
add_subdirectory(application/littlefs)
add_subdirectory(application/wifi)
add_subdirectory(application/configer)
add_subdirectory(application/p2p)
add_subdirectory(application/spi)
add_subdirectory(application/audio)
add_subdirectory(application/ota)
add_subdirectory(application/dm)
add_subdirectory(application/time)
add_subdirectory(application/http)

sdk_add_compile_definitions(-DCONFIG_CLI_CMD_ENABLE)

sdk_add_include_directories(application/common)
sdk_add_include_directories(application/lib3party/inc)
sdk_add_include_directories(application/.)


target_sources(app PRIVATE application/common/ls_trace_common.c)

link_directories(application/lib3party/lib/)
sdk_add_link_libraries(libPPCS_API_4.5.3_BL616_LNS-OEM_BL618.a)

sdk_set_main_file(application/main.c)

project(doorlock)
